home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / smlnet1f.arc / WRITNAME.BAS < prev   
Encoding:
BASIC Source File  |  1989-06-19  |  1.4 KB  |  53 lines

  1. REM
  2. REM  This program will read the raw RBBSLIST.* or NODELIST.* file
  3. REM  and create/display boards that match the prefix below.
  4. REM  You would then use an editor to move the output into the
  5. REM  Smlnet.nam file in the order that you want.
  6. REM
  7. REM  This is meant primarily when the sysop first sets up Smlnet, and
  8. REM  wants to add his local boards only to the Smlnet.Nam file.
  9. REM
  10. PREFIX$=",1-214-"
  11.  
  12. OPEN "\BINKLEY\NODELIST.125" FOR INPUT AS #1
  13. OPEN "TEMP.TXT" FOR OUTPUT AS #2
  14.  
  15. WHILE NOT EOF(1)
  16.  LINE INPUT #1, BOARD$
  17.  IF LEFT$(BOARD$,1)<>";" THEN
  18.   IF LEFT$(BOARD$,4)="Zone"   OR _
  19.      LEFT$(BOARD$,6)="Region" OR LEFT$(BOARD$,4)="Host" THEN _
  20.      GOSUB GET.ADDRESS :NET=R :NODE=0 _
  21.   ELSE _
  22.      GOSUB GET.ADDRESS :NODE=R
  23.  
  24.   IF INSTR(BOARD$,PREFIX$)>0 THEN GOSUB GET.NAME :_
  25.      PRINT #2,USING" #####  #####  \                             \"; _
  26.               NET, NODE, R$
  27.  
  28.  END IF
  29. WEND
  30. CLOSE
  31. END
  32.  
  33. GET.ADDRESS:
  34.    R$=BOARD$
  35.    R=INSTR(R$,",") :R$=MID$(R$,R+1)
  36.    R=INSTR(R$,",") :IF R>0 THEN R$=LEFT$(R$,R-1)
  37.    R=VAL(R$)
  38.    RETURN
  39.  
  40. GET.NAME:
  41.    R$=BOARD$
  42.    R=INSTR(R$,",") :R$=MID$(R$,R+1)
  43.    R=INSTR(R$,",") :R$=MID$(R$,R+1)
  44.    R=INSTR(R$,",") :R$=MID$(R$,R+1)
  45.    R=INSTR(R$,",") :R$=MID$(R$,R+1)
  46.    R=INSTR(R$,",") :IF R>0 THEN R$=LEFT$(R$,R-1)
  47.    FOR R=1 TO LEN(R$)
  48.    IF MID$(R$,R,1)="_" THEN MID$(R$,R,1)=" "
  49.    NEXT R
  50.    RETURN
  51.  
  52. REM  End of Program     (Written in MS QuickBasic 2.01)
  53.